package com.woorigil.social.controller;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

import com.woorigil.social.domain.ApplicationService;

public class DealLoadServlet extends HttpServlet {
	private ApplicationService applicationInitService;

	@Override
	public void init(ServletConfig servletConfig) throws ServletException {
		super.init(servletConfig);
		try {
			
			WebApplicationContext webAppCtxt = WebApplicationContextUtils.getWebApplicationContext(servletConfig.getServletContext());
			applicationInitService = webAppCtxt.getBean(ApplicationService.class);
			applicationInitService.initialize();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
